package com.ruoyi.applet.appletRegion.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.List;

/**
 * 小程序地区对象 applet_region
 * @author ruoyi
 * @date 2024-12-17
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class AppletRegion extends BaseEntity {
    
    private static final long serialVersionUID = 1L;
    
    /** 地区代码 */
    private Long id;
    
    /** 当前地区的上一级地区代码 */
    @Excel(name = "当前地区的上一级地区代码")
    private Long pid;
    
    /** 级别（0-省，1-市，2-区） */
    @Excel(name = "级别", readConverterExp = "0=-省，1-市，2-区")
    private Long deep;
    
    /** 地区名称 */
    @Excel(name = "地区名称")
    private String name;
    
    /** ext_id */
    @Excel(name = "ext_id")
    private String extId;
    
    /** ext_名字 */
    @Excel(name = "ext_名字")
    private String extName;
    
    /** 状态（0-显示，1-隐藏） */
    @Excel(name = "状态", readConverterExp = "0=-显示，1-隐藏")
    private Long status;
    
    /** 子列表 */
    private List<AppletRegion> sunList = new ArrayList<>();
    
    
    public Long getId() {
        return id;
    }
    
    public void setId(Long id) {
        this.id = id;
    }
    
    public Long getPid() {
        return pid;
    }
    
    public void setPid(Long pid) {
        this.pid = pid;
    }
    
    public Long getDeep() {
        return deep;
    }
    
    public void setDeep(Long deep) {
        this.deep = deep;
    }
    
    public String getName() {
        return name;
    }
    
    public void setName(String name) {
        this.name = name;
    }
    
    public String getExtId() {
        return extId;
    }
    
    public void setExtId(String extId) {
        this.extId = extId;
    }
    
    public String getExtName() {
        return extName;
    }
    
    public void setExtName(String extName) {
        this.extName = extName;
    }
    
    public Long getStatus() {
        return status;
    }
    
    public void setStatus(Long status) {
        this.status = status;
    }
    
    public List<AppletRegion> getSunList() {
        return sunList;
    }
    
    public void setSunList(List<AppletRegion> sunList) {
        this.sunList = sunList;
    }
    
    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("pid", getPid())
                .append("deep", getDeep())
                .append("name", getName())
                .append("extId", getExtId())
                .append("extName", getExtName())
                .append("status", getStatus())
                .toString();
    }
}
